function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

// 接口地址: https://wwww.xxxx.com
var origin = ''; // 项目构建部署路径(注意在最后携带斜线)：/xxxx/

var deployDirectory = '/xiaoMing-bms/'; // 项目全路径

var href = "".concat(origin).concat(deployDirectory === '/' ? '' : deployDirectory); // api前缀

var apiPrefix = "".concat(href, "api"); // 下载路径
// const downloadApi = `${href}file/download`;

var downloadApi = "/xiaoMing-file/api/file/file/download"; // /xiaoMing-file/api/file/file/download
// 上传路径
// const uploadApi = `/xiaoMing-file/api/file/file/upload`;

var uploadApi = "/xiaoMing-file/api/file/file/upload"; // im

var socketApi = "".concat(href, "im"); // 客户端标识

var client = '00'; // 全局配置

var configure = {
  origin: origin,
  deployDirectory: deployDirectory,
  href: href,
  apiPrefix: apiPrefix,
  downloadApi: downloadApi,
  uploadApi: uploadApi,
  socketApi: socketApi,
  client: client,
  api: {}
}; // 初始化配置变量

export var initConfigure = function initConfigure(obj) {
  configure = _objectSpread(_objectSpread({}, configure), obj);
  return configure;
}; // 取出配置变量

export var getConfigure = function getConfigure() {
  return configure;
};
export default {
  init: initConfigure
};